Skip to content

refactor(analytics): replace useGetAnalytics with individual queries for decision outcomes, rule hits, and screening hits - #1203

Merged
siiick merged 1 commit into
mainfrom
feat/in-app-analytics-split-queries
Nov 7, 2025
Merged

refactor(analytics): replace useGetAnalytics with individual queries for decision outcomes, rule hits, and screening hits#1203
siiick merged 1 commit into
mainfrom
feat/in-app-analytics-split-queries

Conversation

@siiick

@siiick siiick commented Nov 7, 2025

Copy link
Copy Markdown
Contributor

Move the parallel loading of analytics queries to the page level so that each chart and table is displayed as soon as its data becomes available.

@siiick
siiick force-pushed the feat/in-app-analytics-split-queries branch from 74b449a to 4f48b31 Compare November 7, 2025 12:01

@Pascal-Delange Pascal-Delange left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

…for decision outcomes, rule hits, and screening hits
@siiick
siiick force-pushed the feat/in-app-analytics-split-queries branch from 4f48b31 to 869dba1 Compare November 7, 2025 12:52
@siiick
siiick merged commit c2709e7 into main Nov 7, 2025
5 checks passed
@siiick
siiick deleted the feat/in-app-analytics-split-queries branch November 7, 2025 12:56
Comment on lines +212 to +225
const { data: decisionsOutcomesPerDayData, isFetching: isDecisionsOutcomesPerDayFetching } =
useGetDecisionsOutcomesPerDay({
scenarioId,
queryString: queryString ?? '',
});
const { data: ruleHitTableData, isFetching: isRuleHitTableFetching } = useGetRuleHitTable({
scenarioId,
queryString: queryString ?? '',
});
const { data: ruleVsDecisionOutcomeData, isFetching: isRuleVsDecisionOutcomeFetching } = useGetRuleVsDecisionOutcome({
scenarioId,
queryString: queryString ?? '',
});
const { data: screeningHitsTableData, isFetching: isScreeningHitsTableFetching } = useGetScreeningHitsTable({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The destructuring is not consistent with other uses of useQuery and also makes you alias field. It would be better to keep variables like decisionsOutcomesPerDayQuery

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants